//////////////////////////////////////////////////////////////////
// Fallengelassene Items werden direkt entfernt (Muellmaenner gibts nicht mehr)
//////////////////////////////////////////////////////////////////

instance clrItm(oCItem);

func void DeleteItems() {
	PrintDebug("BOTK: MUELLMANN: Start");
	
	var int activeVobList;	 	activeVobList = MEM_World.activeVobList_array;
	var int activeVobList_max; 	activeVobList_max = MEM_World.activeVobList_numInArray;
	
	var int i; i = 0;
	var int ptr; 
	
	var int pos;
	pos = MEM_StackPos.position;
		ptr = MEM_ReadInt(activeVobList+4*i);
		
		MEM_AssignInst(clrItm, ptr);
		if (clrItm.mainflag & ITEM_KAT_NF)||(clrItm.mainflag & ITEM_KAT_FF)/*||(clrItm.mainflag & ITEM_KAT_MUN)*/ {
			if Hlp_IsValidItem(clrItm) {
				Wld_RemoveItem(clrItm);
			};
		};
		
		i += 1;
		if(i < activeVobList_max) {
	MEM_StackPos.position = pos;  };
	
	PrintDebug("BOTK: MUELLMANN: Finished");
};

func void B_Muellmann()
{
	DeleteItems();
};

var int B_RangedWeaponCrashFix_Var;
func void B_RangedWeaponCrashFix_Sub(var int node) {
	var int data; data = MEM_ReadInt(node+4);
	var oCNpc oth; MEM_AssignInst(oth, data);
	var c_npc c_oth; c_oth = Hlp_GetNpc(oth);
	Npc_GetTarget(c_oth);
	
	if(Hlp_GetInstanceID(other) == B_RangedWeaponCrashFix_Var) {
		Npc_ClearAIQueue(c_oth);
		AI_StandUpQuick(c_oth);
		PrintDebug("BOTK: RANGEDWEAPONCRASHFIX: Killed target");
	};
};
func void B_RangedWeaponCrashFix(var int slf) {
	B_RangedWeaponCrashFix_Var = slf;
	List_ForS(MEM_World.voblist_npcs, "B_RANGEDWEAPONCRASHFIX_SUB");
};








